import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:leader_help/utils/util.dart';

import 'state.dart';

class RegisterController extends GetxController {
  final state = RegisterState();

  @override
  void onInit() {
    super.onInit();
    obseverEvent();
  }

  void obseverEvent() {
    state.loginGesture.onTap = () {
      Get.log('登录');
      Get.back();
    };
    state.forgotGesture.onTap = () {
      Get.log('忘记密码');
      Get.toNamed(RouterPath.find_back_success);
    };
  }

  void register() {
    Get.offNamed(RouterPath.register_success);
  }
}
